﻿using System;
using BLL;

public partial class InstrumentManage_ENAOfflineRegister : System.Web.UI.Page
{
    private ENA eNA;

    public InstrumentManage_ENAOfflineRegister()
    {
        eNA = new ENA();
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {
            string eNAID = this.TextBox1.Text.Trim();
            DateTime dt = DateTime.Parse(this.TextBox2.Value.Trim());
            string str = eNA.ENA_Offline(eNAID, dt, User.Identity.Name);
            ClientScript.RegisterStartupScript(ClientScript.GetType(), "", "<script>alert('" + str + "');</script>");
        }
        catch(FormatException)
        {
            string str1 = "矢网编号或时间输入格式有误，请检查！";
            ClientScript.RegisterStartupScript(ClientScript.GetType(), "", "<script>alert('" + str1 + "');</script>");
        }
    }
}
